package com.ruoyi.common.utils;

public class WeekTranUtils {

    //通过上课时间 数字 周 1 返回 文字周一
    public  static String week(String num){
        String week = "";
        if(num.equals("1")){
            week = "周一：";
            return week;
        }else if(num.equals("2")){
            week = "周二：";
            return week;
        }else if(num.equals("3")){
            week = "周三：";
            return week;
        }else if(num.equals("4")){
            week = "周四：";
            return week;
        }else if(num.equals("5")){
            week = "周五：";
            return week;
        }else if(num.equals("6")){
            week = "周六：";
            return week;
        }else if(num.equals("7")){
            week = "周日：";
            return week;
        }
        return week;
    }

    //通过上课时间 数字 周 1 返回 文字周一
    public static Long weekForNum(String num){
        Long week =0l;
        if(num.equals("一")){
            week = 1l;
            return week;
        }else if(num.equals("二")){
            week = 2l;
            return week;
        }else if(num.equals("三")){
            week = 3l;
            return week;
        }else if(num.equals("四")){
            week = 4l;
            return week;
        }else if(num.equals("五")){
            week = 5l;
            return week;
        }else if(num.equals("六")){
            week = 6l;
            return week;
        }else if(num.equals("日")){
            week = 7l;
            return week;
        }
        return week;
    }

}
